package praktikum_3_ylesanded.ylesanne_1;

import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: Jaan Sepp and Martti Elias
 * Date: 17.11.11
 * Time: 22:20
 */
class Node {
  int level;
  int weight, profit, bound;
  ArrayList<Integer> contains;

  public Node() {
    level = 0;
    weight = 0;
    profit = 0;
    bound = 0;
    contains = null;
  }

  public void copyList (ArrayList<Integer> v) {
    contains = (v == null || v.isEmpty()) ? new ArrayList<Integer>() : new ArrayList<Integer>(v);
  }

  public void add (int index) {
    contains.add(index);
  }
}